Main Page | Class Hierarchy | Class List | Class Members

MPServerSettings Class Reference

MP Game Server Settings message (Type: 4). More...

#include <BustaNetInternal.h>

Inheritance diagram for MPServerSettings:

BustaNetInternalMsg List of all members.

Public Member Functions

 MPServerSettings (char *sName, int nClients, netClient **sClients)
 CONSTRUCTOR.
 ~MPServerSettings ()
 DESTRUCTOR.
char * getServerName ()
 Returns the name of the server.
int getNumClients ()
 Returns the number of connected clients.
netClientgetClient (int index)
 Returns a connected client's information.
netClient ** getClients ()
 Returns connected client information.
void setServerName (char *newName)
 Sets the recorded server name.

Detailed Description

MP Game Server Settings message (Type: 4).

This message contains information about the game server. This includes the server name, the number of connected clients, and client information.


Constructor & Destructor Documentation

MPServerSettings::MPServerSettings char *  sName,
int  nClients,
netClient **  sClients
 

CONSTRUCTOR.

Creates an instance of the MPServerSettings class.

Parameters:
sName The name of the server
nClients The number of currently connect clients
sClients An array of netClients containing information about the connected clients

MPServerSettings::~MPServerSettings  ) 
 

DESTRUCTOR.

Frees memory associated with message.


Member Function Documentation

netClient * MPServerSettings::getClient int  index  ) 
 

Returns a connected client's information.

The server maintains a listing of all clients connected to it. This method returns the information about a single one of those clients.

Parameters:
index The index of the client whose information to return
Returns:
A netClient pointer containing connected client information. NULL is returned if the requested index is negative or is greater than numClients, the number of currently connected clients.
See also:
netClient

netClient ** MPServerSettings::getClients  ) 
 

Returns connected client information.

The server maintains a listing of all clients connected to it. This method returns the information about those clients in an array.

See also:
netClient
Returns:
An array of netClients containing connected client information

int MPServerSettings::getNumClients  ) 
 

Returns the number of connected clients.

Returns the number of clients connected to the game server.

Returns:
The number of connected clients

char * MPServerSettings::getServerName  ) 
 

Returns the name of the server.

Each game server is allowed to have a specific name. This method returns the name of the server when a MPServerSettings message is received.

Returns:
The server name

void MPServerSettings::setServerName char *  newName  ) 
 

Sets the recorded server name.

Sets the client's perception of what the server's name is to the client.

Parameters:
newName The new name to be associated with the server


Generated on Sun Aug 14 22:24:57 2005 for BustaSandwich Networking by  doxygen 1.4.2-20050421